//
//  QuDanCompleteSexViewCell.m
//  QuDanOEM
//
//  Created by mac on 2021/11/15.
//

#import "QuDanCompleteSexViewCell.h"

@implementation QuDanCompleteSexViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.notLitmetdBtn.layer.cornerRadius = 15.0f;
    self.notLitmetdBtn.layer.masksToBounds = YES;
    self.manBtn.layer.cornerRadius = 15.0f;
    self.manBtn.layer.masksToBounds = YES;
    self.woManBtn.layer.cornerRadius = 15.0f;
    self.woManBtn.layer.masksToBounds = YES;
}
/// 不限
/// @param sender 不限
- (IBAction)actionNotLimtedBtn:(UIButton *)sender
{
    self.notLitmetdBtn.backgroundColor = QD_RGB(247, 99, 7);
    [self.notLitmetdBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    self.manBtn.backgroundColor = QD_RGB(238, 238, 238);
    [self.manBtn setTitleColor:QD_RGB(106, 107, 110) forState:UIControlStateNormal];
    self.woManBtn.backgroundColor = QD_RGB(238, 238, 238);
    [self.woManBtn setTitleColor:QD_RGB(106, 107, 110) forState:UIControlStateNormal];
    if (self.QuDanCompleteSexViewCellBlock) {
        self.QuDanCompleteSexViewCellBlock(@"不限");
    }
//    if (self.delegate && [self.delegate respondsToSelector:@selector(QuDanCompleteSexSelctStr:)]) {
//        [self.delegate QuDanCompleteSexSelctStr:@"不限"];
//    }
}
/// 男生
/// @param sender 男生
- (IBAction)actionManBtn:(UIButton *)sender
{
    self.notLitmetdBtn.backgroundColor = QD_RGB(238, 238, 238);
    [self.notLitmetdBtn setTitleColor:QD_RGB(106, 107, 110) forState:UIControlStateNormal];
    self.manBtn.backgroundColor = QD_RGB(247, 99, 7);
    [self.manBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    self.woManBtn.backgroundColor = QD_RGB(238, 238, 238);
    [self.woManBtn setTitleColor:QD_RGB(106, 107, 110) forState:UIControlStateNormal];
    if (self.QuDanCompleteSexViewCellBlock) {
        self.QuDanCompleteSexViewCellBlock(@"男生");
    }
//    if (self.delegate && [self.delegate respondsToSelector:@selector(QuDanCompleteSexSelctStr:)]) {
//        [self.delegate QuDanCompleteSexSelctStr:@"男生"];
//    }
}
/// 女生
/// @param sender 女生
- (IBAction)actionWomanBtn:(UIButton *)sender
{
    self.notLitmetdBtn.backgroundColor = QD_RGB(238, 238, 238);
    [self.notLitmetdBtn setTitleColor:QD_RGB(106, 107, 110) forState:UIControlStateNormal];
    self.manBtn.backgroundColor = QD_RGB(238, 238, 238);
    [self.manBtn setTitleColor:QD_RGB(106, 107, 110) forState:UIControlStateNormal];
    self.woManBtn.backgroundColor = QD_RGB(247, 99, 7);
    [self.woManBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    if (self.QuDanCompleteSexViewCellBlock) {
        self.QuDanCompleteSexViewCellBlock(@"女生");
    }
//    if (self.delegate && [self.delegate respondsToSelector:@selector(QuDanCompleteSexSelctStr:)]) {
//        [self.delegate QuDanCompleteSexSelctStr:@"女生"];
//    }
}
@end
